package com.ifdom.enumration;

/**
 * sdk1.5之前
 * 需要自己定义枚举类
 */
public class Enum15Before {

    public static void main(String[] args) {
        Sakyamuni today = Sakyamuni.today;
        Sakyamuni latest = Sakyamuni.latest;
        System.out.println(today);
        System.out.println(latest);
    }

}

class Sakyamuni {

    private final String name;
    private final String value;

    public static final Sakyamuni today = new Sakyamuni("现在佛", "释迦摩尼");
    public static final Sakyamuni latest = new Sakyamuni("未来佛", "弥勒佛");
    public static final Sakyamuni later = new Sakyamuni("过去佛", "燃灯古佛");

    public Sakyamuni(String name, String value) {
        this.name = name;
        this.value = value;
    }

    @Override
    public String toString() {
        return "Sakyamuni{" +
                "name='" + name + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}
